package com.jt.controller;/**
 * @Author 金帮嘉诚 @Date 2021-07-22 星期四 20:54
 */
/*本类用于测试*/

import com.jt.pojo.User;
import com.jt.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 知识点
 * 1.
 * 2.
 * 3.
 * 4.
 */
@RestController
@RequestMapping
@PropertySource(value = "classpath:Mybatis/person.properties", encoding = "UTF-8")
public class UserController {
    @Value("${person.name}")
    private String name;
    @RequestMapping("/jbjc")
    public String personName(){
        return name;
    }


    @Autowired
    private UserService userService;
    @RequestMapping("getAll")
    public List<User> getAll(){
        return userService.getAll();
    }
}
